package cn.gok.dao;

import cn.gok.pojo.Cart;
import javafx.scene.control.Tab;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    List<Cart> selectCartByUserId(int user_id);

    Cart selectCartByUserIdAndProductId(@Param("userId")int user_id,@Param("productId")int product_id);

    int updateCartByProductId(Cart cart);

    int deleteCartByProductIds(@Param("list")List<Integer> list,@Param("userId")int user_id);

    int updateByUserIdProductIdSelective(Cart cart);

    List<Cart> selectAllCheckedProducts(int userId);

}